// components/index/new-client/new-client.js
var app = getApp();
Component({
  /**
   * 组件的属性列表
   */
   properties: {
    list: {
      type: Object,
      value: ()=>({})
    },
    userInfo: {
      type: Object,
      value: ()=>({})
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    getNew(){
      if(this.data.userInfo && this.data.userInfo.phone){
        wx.showToast({
          title: "模拟领取成功"
        })
        return ;
      }
      this.goLogin();
    },
    goLogin() {
      if(this.data.userInfo && this.data.userInfo.phone){
          return false
      }
      wx.navigateTo({
          url: '/pages/authorized/index'
      })
  },
  }
})
